package Test1;
import java.util.Scanner;
public class phoneNumber {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        System.out.print("请输入一个电话号码：");
        String str = s.next();
        boolean a = matches(str);
        if(a){
            System.out.println("number is correct");
        }
        else{
            System.out.println("number is wrong");
        }

    }
    public static boolean matches(String regex){
        char[] arr = regex.toCharArray();
        if(regex.length() > 11 || arr[0] != '1' || arr[1] < '3')
            return false;
        else
            return true;
    }
}
